/*
day394 
2020.9.25 
*/ 
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

class Solution {
public:
    int maxProduct(vector<int>& nums) {
		sort(nums.begin(),nums.end());
		return (nums[nums.size()-1]-1)*(nums[nums.size()-2]-1);
    }
};

int main()
{
	return 0;
 } 
